async function opfs() {
  const opfsRoot = await navigator.storage.getDirectory();
  // Window.showOpenFilePicker()  // FileSystemFileHandle 对象
  console.log('opfsRoot', opfsRoot);
  // 创建层级结构的文件和文件夹
  const fileHandle = await opfsRoot.getFileHandle("my first file", {
    create: true,
  });
  const directoryHandle = await opfsRoot.getDirectoryHandle("my first folder", {
    create: true,
  });
  console.log('fileHandle', fileHandle);
  console.log('directoryHandle', directoryHandle);
  const nestedFileHandle = await directoryHandle.getFileHandle(
    "my first nested file",
    { create: true },
  );
  const nestedDirectoryHandle = await directoryHandle.getDirectoryHandle(
    "my first nested folder",
    { create: true },
  );
  console.log('nestedFileHandle', nestedFileHandle);
  console.log('nestedDirectoryHandle', nestedDirectoryHandle);
  // 通过文件名和文件夹名访问已有的文件和文件夹
  const existingFileHandle = await opfsRoot.getFileHandle("my first file");
  const existingDirectoryHandle =
    await opfsRoot.getDirectoryHandle("my first folder");
  console.log('existingFileHandle', existingFileHandle);
  console.log('existingDirectoryHandle', existingDirectoryHandle);
  // FileSystemFileHandle.getFile() 以访问文件的内容，使用 FileSystemFileHandle.createWritable() / FileSystemWritableFileStream.write() 来修改内容
  // 调用 FileSystemHandle.requestPermission({mode: 'readwrite'}) 来请求用户的权限以保存更改
  // directoryHandle.removeEntry("my first nested file"); // 删除文件或目录
  // await directoryHandle.remove({ recursive: true }); // 删除文件或目录
  for await (let [name, handle] of directoryHandle) {
    console.log(' [name, handle]', [name, handle]);
  }

}